/**
 * Created by IntelliJ IDEA.
 * User: Liu Yuhong
 * Date: 12-10-3
 * Test.
 */

$(function() {
	 var menuGroupsStd = [
		                  {
		                      'menuId': "selfServiceMenu",
		                      'menuTitle': getLanMsg("0ec22400-000041"),
		                      'iconClass': "account",
		                      'iconImg': null,
		                      'needShow': true,
		                      'items': [
		                           {
		                        	   'itemId': "menuItem0",
		                        	   'itemName': getLanMsg("0ec22400-000006"),
		                        	   'needShow':true,
		                        	   "itemUrl": "/ebvp/selfinfo/password?menuid=41"
		                           },
		                          {
		                              'itemId': "defaultlinkmanMaintain",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000007"),
		                              'needShow': bModuleSRM,
		                              'callback': function() {window.location = ebvp_context + "/selfinfo/userinfo"; return false; }
		                          },
		                          {
		                              'itemId': "enterpriceInfoMaintain",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000008"),
		                              'needShow': bModuleSRM,
		                              'callback': function() { window.location = ebvp_context + "/selfinfo/editinfo"; return false; }
		                          },
		                          {
		                              'itemId': "linkmanMaintain",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000009"),
		                              'needShow': bModuleSRM,
		                              'callback': function() {  window.location = ebvp_context + "/selfinfo/contractlist"; return false; }
		                          },
		                          {
		                              'itemId': "prodpriceMaintain",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000010"),
		                              'needShow': bModuleEBP,
		                              'callback': function() { window.location = ebvp_context + "/prodprice/prodpricelist"; return false; }
		                          },
		                          {
		                              'itemId': "downloadCenter",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000011"),
		                              'needShow': bModuleEBP,
		                              'callback': function() { window.location = ebvp_context + "/infopub/viewfile";  return false; }
		                          }
		                      ]
		                  }
		              ];
	 
	var menuGroupsGh = [
		                  {
		                      'menuId': "selfServiceMenu",
		                      'menuTitle': getLanMsg("0ec22400-000041"),
		                      'iconClass': "account",
		                      'iconImg': null,
		                      'needShow': true,
		                      'items': [
		                          {
		                              'itemId': "changePassword",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000006"),
		                              'needShow': true,
		                              'callback': function() { window.open("https://chinajvs.towngas.com.cn/iisadmpwd/aexp2b.asp");  return false; }
		                          },
		                          {
		                              'itemId': "defaultlinkmanMaintain",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000007"),
		                              'needShow': bModuleSRM,
		                              'callback': function() {window.location = ebvp_context + "/selfinfo/userinfo"; return false; }
		                          },
		                          {
		                              'itemId': "enterpriceInfoMaintain",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000008"),
		                              'needShow': bModuleSRM,
		                              'callback': function() { window.location = ebvp_context + "/selfinfo/editinfo"; return false; }
		                          },
		                          {
		                              'itemId': "linkmanMaintain",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000009"),
		                              'needShow': bModuleSRM,
		                              'callback': function() {  window.location = ebvp_context + "/selfinfo/contractlist"; return false; }
		                          },
		                          {
		                              'itemId': "prodpriceMaintain",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000010"),
		                              'needShow': bModuleEBP,
		                              'callback': function() { window.location = ebvp_context + "/prodprice/prodpricelist"; return false; }
		                          },
		                          {
		                              'itemId': "downloadCenter",
		                              'itemUrl': ".",
		                              'itemName': getLanMsg("0ec22400-000011"),
		                              'needShow': bModuleEBP,
		                              'callback': function() { window.location = ebvp_context + "/infopub/viewfile";  return false; }
		                          }
		                      ]
		                  }
		              ];
	 				
					 if(bStdVersion){
						 $( "#columnLeft" ).UIColumnMenu({
							 'menuGroups': menuGroupsStd,
							 'menuHeight': 438,
							 'singleGroup': true
						 });
					 }else {
						 $( "#columnLeft" ).UIColumnMenu({
							 'menuGroups': menuGroupsGh,
							 'menuHeight': 438,
							 'singleGroup': true
						 });
					 }    
});
